<?php

declare(strict_types=1);

/**
 * @Author:     Frank
 * @contact     frank_hhm@163.com
 * @Date:       2022-11-08 13:57:04
 * @Last Modified time: 2023-02-08 14:16:36
 */
namespace app\sys\controller;	
use frank\base\BaseController;
use app\common\enum\EnumFactory;

/**
 * Class Publics
 * @NoMiddleware("app\sys\middleware\AuthMiddleware")
 */
class Publics extends BaseController
{ 	
    /**
     * 获取系统信息
     * @method(GET)
     */
    public function systemInfo()
    {
        $data['system_name'] = sysconf('system_name');
        $data['system_version'] = sysconf('system_version');
        $data['map']['key'] = sysconf('map_key');
        $data['map']['secret'] = sysconf('map_secret_key');
        $this->success($data);
    }

    /**
     * 获取系统权举数据
     * @method(GET)
     */
    public function enum()
    {
        $this->success(EnumFactory::getAll());
    }
}
